function delserver(obj){

var ajax = $.ajax({
		type: "POST",
		url: '/delhost',
		data: {"inputIp": obj},
		timeout: 15000,
		success: function (data)
        {
           alert("删除结果"+data.success);
        },
		dataType: 'json',
		async: true,
	});

}

$("#btn_addserver").click(function(){
    var inputIp  = $("#inputIp").val();
    var inputPort = $("#inputPort").val();
    var inputGroup = $("#inputGroup").val();
    var inputUserName = $("#inputUserName").val();
    var inputPassword = $("#inputPassword").val();

    var ajax = $.ajax({
		type: "POST",
		url: '/addhost',
		data: {"inputIp": inputIp,"inputPort":inputPort,"inputGroup":inputGroup,"inputUserName":inputUserName,"inputPassword":inputPassword},
		timeout: 15000,
		success: function (data)
        {
           alert("添加结果"+data.success);
        },
		dataType: 'json',
		async: true,
	});
});